Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSON response for blocked account login #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iamahless
Copy link

This pull request includes changes to the handle method in two middleware files, ForbidBannedUser.php and LogsOutBannedUser.php. The changes add a check for whether the request expects a JSON response, and if so, it aborts the request with a 403 status code and a message indicating that the account is blocked.

  • src/Http/Middleware/ForbidBannedUser.php: Added a check to see if the request expects a JSON response. If it does, the request is aborted with a 403 status code and an error message.
  • src/Http/Middleware/LogsOutBannedUser.php: Similar to the change in ForbidBannedUser.php, a check was added to see if the request expects a JSON response. If it does, the request is aborted with a 403 status code and an error message.

***Add JSON response for blocked account login in LogsOutBannedUser middleware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant